package com.linq.cool.entities;

import com.linq.cool.tree.annotation.*;
import com.linq.cool.tree.enums.FieldType;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: yqlin
 * @Date: 2020/11/25 10:53
 * @Description: {
 * "id": "1",
 * "company_id": "8",
 * "area_code": "100000",
 * "area_name": "中国",
 * "area_level": "0",
 * "parent_area_code": "0",
 * "citycode": "",
 * "zipcode": "",
 * "mergername": "中国",
 * "lan": "116.3683244",
 * "lat": "39.915085",
 * "pinyin": "China"
 * },
 * @Version: 1.0.0
 */
@TreeEntity
@Data
@Accessors(chain = true)
public class Area {
    private String id;
    private String company_id;
    @TreeField(fieldType = FieldType.ID)
    @TreeId
    private String area_code;
    @TreeField(fieldType = FieldType.PID)
    @TreePid
    private String parent_area_code;
    private String area_name;
    private String area_level;
    private String citycode;
    private String zipcode;
    private String mergername;
    private String lan;
    private String lat;
    private String pinyin;
    @TreeField(fieldType = FieldType.CHILD)
    @TreeChild
    List<Area> children = new ArrayList<>();
}
